<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<%
   String comName = (String)request.getAttribute("comName");
%>
<%@ include file="../bui_header.jsp" %>

<body>

<div class="container">
    <div class="search-grid-container">
      <div id="biz_grid"></div>
    </div>
  </div>
  
<script type="text/javascript">
BUI.use(['bui/grid','bui/data'], function (Grid, Data) {
    var comName = '<%=comName %>';
    var columns = [
        /* {title:'编号',dataIndex:'number',width:60
        }, */
        {title:'企业名称', dataIndex:'companyName', width:'15%'},
        {title:'年度', dataIndex:'belongYear',width:'5%'},
        {title:'税收（万元）',dataIndex:'revenue',width:'10%',
        	renderer: function(value, obj) {
        		return value + '（￥）';
        	}},
        {title:'税收评分', dataIndex:'revenueGrade',width:'10%'},
        {title:'对外投资总规模',dataIndex:'externalInvestScale',width:'10%'}, 
        {title:'对外投资评分',dataIndex:'externalInvestGrade',width:'10%'}, 
        {title:'退出项目评分',dataIndex:'exitProjectGrade',width:'10%'}, 
        {title:'退出项目规模',dataIndex:'exitProjectScale',width:'10%'},
        {title:'重大机构1名称',dataIndex:'greatOrg1Name',width:'10%'}, 
        {title:'重大机构1投资规模',dataIndex:'grateOrg1InvestScale',width:'10%'}, 
        {title:'重大机构1评分',dataIndex:'grateOrg1Grade',width:'10%'}, 
        {title:'重大机构2名称',dataIndex:'grateOrg2Name',width:'10%'}, 
        {title:'重大机构2投资规模',dataIndex:'grateOrg2InvestScale',width:'10%'}, 
        {title:'重大机构2评分',dataIndex:'grateOrg2Grade',width:'10%'}
      ];
    
	    var store = new Data.Store({
	  	  	url : '<%=contextPath %>/bizinfo/gqtzgs/getdata.do?company_name='+comName,
	        proxy : {//设置请求相关的参数
	          method : 'post',
	          dataType : 'json'
	          //dataType : 'jsonp', //返回数据的类型
	          //limitParam : 'limit', //一页多少条记录
	        	//pageIndexParam : 'pageIndex', //页码
	          //startParam : 'startNum' //起始记录
	        },
	        autoLoad:true,
	        pageSize:30	// 配置分页数目
	    });
	    
	    var height = $(window).height() - 60;  
	    var grid = new Grid.Grid({
	    	height: height,
	        render: '#biz_grid',
	        columns : columns,
	        loadMask: true,
	        //width: '150%', //这个属性一定要设置
	        store: store,
	        // 底部工具栏
	        bbar:{
	            // pagingBar:表明包含分页栏
	            pagingBar:true
	        }
	    });
	
	    grid.render();
    ss();
  });
function ss() {
	var $grid = $(".bui-grid");
	if (!$grid)
		  return ;
	var $gridBody = $grid.find(".bui-grid-body");
	if (!$gridBody)
		  return ;
	$gridBody.css('overflow-y', 'auto');
  
  var $gridTable = $grid.find(".bui-grid-table");
  if ($gridTable)
	  $gridTable.width($gridBody.width()); 
}
</script>

		
</body>
</html>